import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget{
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'HELLO FLUTTER',
      home: Scaffold(
        appBar: AppBar(
          title: const Text('LISTVIEW WIDGET'),
        ),
        body: ListView(
          // 滚动方向  vertical/horizontal
          scrollDirection: Axis.horizontal,
          children: [
            const SizedBox(
              width: 180.0,
              child: ListTile(
                title: Text('标题一'),
                subtitle: Text('标题1.1'),
                leading: Icon(
                    Icons.star
                ),
              ),
            ),
            const SizedBox(
              width: 180.0,
              child: ListTile(
                title: Text('标题二'),
                subtitle: Text('标题2.1'),
                leading: Icon(
                    Icons.star
                ),
              ),
            ),
            const SizedBox(
              width: 180.0,
              child: ListTile(
                title: Text('标题三'),
                subtitle: Text('标题3.1'),
                leading: Icon(
                    Icons.star
                ),
              ),
            ),
            Image.network(
              'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg2.hx2car.com%2F78aeead0-9800-3cef-9606-8ae2a323fe5f_small_800_600.jpg&refer=http%3A%2F%2Fimg2.hx2car.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642845769&t=30f4861391463f446f42ac6426ba0ce4',
              width: 200.0,
              height: 200.0,
            ),
            Image.network(
              'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg2.hx2car.com%2F78aeead0-9800-3cef-9606-8ae2a323fe5f_small_800_600.jpg&refer=http%3A%2F%2Fimg2.hx2car.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642845769&t=30f4861391463f446f42ac6426ba0ce4',
              width: 200.0,
              height: 200.0,
            ),
            Image.network(
              'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg2.hx2car.com%2F78aeead0-9800-3cef-9606-8ae2a323fe5f_small_800_600.jpg&refer=http%3A%2F%2Fimg2.hx2car.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642845769&t=30f4861391463f446f42ac6426ba0ce4',
              width: 200.0,
              height: 200.0,
            ),
          ],
        ),
      ),
    );
  }
}